﻿using System;
using System.Runtime.InteropServices;

namespace Antix.VSAddIn
{
    #region IOleServiceProvider definition

    // Define the native COM/OLE version of IServiceProvider. Note this is NOT 
    // equivalent to the .NET frameworks IServiceProvider interface. 
    //
    // We could use the IServiceProvider interface definition provided by
    // Microsoft.VisualStudio.OLE.Interop.dll, or even the ServiceProvider class
    // included with the Microsoft.VisualStudio.Shell.dll. But most add-in
    // developers probably don't want to take a dependency on either of these
    // assemblies, which would require downloading and installing the 
    // Visual Studio SDK, in order to build the project.
    [
     ComImport,
     Guid("6D5140C1-7436-11CE-8034-00AA006009FA"),
     InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)
     ]
    public interface IOleServiceProvider
    {
        [PreserveSig]
        int QueryService([In]ref Guid guidService, [In]ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out System.Object obj);
    }

    #endregion

    public class VSConstants
    {
        public const uint VSITEMID_NIL = 0xFFFFFFFF;
        public const uint VSITEMID_ROOT = 0xFFFFFFFE;
        public const uint VSITEMID_SELECTION = 0xFFFFFFFD;
    }   
}
